#define _CRT_SECURE_NO_WARNINGS  1
int countBitDiff(int m, int n) {
    int count = 0;
    while (m || n)
    {
        if (m % 2 != n % 2)
        {
            count++;
        }
        m /= 2;
        n /= 2;
    }
    return count;
}
int main()
{
    int m = 0; 
    int n = 0;
    scanf("%d%d", &m, &n);
    int count = countBitDiff(m, n);
    printf("%d", count);
    return 0;
}